﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.IO;


public partial class test_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Write(Tb_adv_search.Rows.Count);
        
    }
    public void Btn_add_search_Click(object sender, EventArgs e)
    {

        TableRow tr = new TableRow();
        TableCell td1 = new TableCell();
        TableCell td2 = new TableCell();
        TableCell td3 = new TableCell();

        TableCell td4 = new TableCell(); DropDownList ddl1 = new DropDownList();
        DropDownList ddl2 = new DropDownList(); TextBox Txb = new TextBox(); Button Btn_del = new Button();
        ddl1.Width = 40; ddl2.Width = 40; Txb.Width = 100; Btn_del.Text = "删除"; td1.Controls.Add(ddl1);
        td2.Controls.Add(ddl2); td3.Controls.Add(Txb); td4.Controls.Add(Btn_del); tr.Cells.Add(td1); tr.Cells.Add(td2);
        tr.Cells.Add(td3); tr.Cells.Add(td4); 
        Tb_adv_search.Rows.Add(tr);
        Btn_del.Click += new EventHandler(Btn_del_Click);
    }
    void Btn_del_Click(object sender, EventArgs e)
    {
        this.Parent.Parent.Controls.Clear();
    }
}
